﻿namespace Sidvall.WorkItemManager.UI.Entities
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
    public sealed partial class MonitorContext : global::Sidvall.WorkItemManager.UI.Entities.Core.BusinessBase, global::Sidvall.WorkItemManager.Data.IMonitorContext
    {
        #region Business Members

        #region BccRecipientAddresses

        private string _BccRecipientAddresses = string.Empty;
        partial void OnBeforeBccRecipientAddressesPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeBccRecipientAddressesPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterBccRecipientAddressesPropertyChanged();
        public string BccRecipientAddresses
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_BccRecipientAddresses);
                OnBeforeBccRecipientAddressesPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _BccRecipientAddresses);
                OnBeforeBccRecipientAddressesPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("BccRecipientAddresses", eventData.Value, true, true, true);
                    OnAfterBccRecipientAddressesPropertyChanged();
                }
            }
        }

        #endregion
        #region Body

        private string _Body = string.Empty;
        partial void OnBeforeBodyPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeBodyPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterBodyPropertyChanged();
        public string Body
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_Body);
                OnBeforeBodyPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _Body);
                OnBeforeBodyPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("Body", eventData.Value, true, true, true);
                    OnAfterBodyPropertyChanged();
                }
            }
        }

        #endregion
        #region CCRecipientAddresses

        private string _CCRecipientAddresses = string.Empty;
        partial void OnBeforeCCRecipientAddressesPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeCCRecipientAddressesPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterCCRecipientAddressesPropertyChanged();
        public string CCRecipientAddresses
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_CCRecipientAddresses);
                OnBeforeCCRecipientAddressesPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _CCRecipientAddresses);
                OnBeforeCCRecipientAddressesPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("CCRecipientAddresses", eventData.Value, true, true, true);
                    OnAfterCCRecipientAddressesPropertyChanged();
                }
            }
        }

        #endregion
        #region ConnectionString

        private string _ConnectionString = string.Empty;
        partial void OnBeforeConnectionStringPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeConnectionStringPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterConnectionStringPropertyChanged();
        public string ConnectionString
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_ConnectionString);
                OnBeforeConnectionStringPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _ConnectionString);
                OnBeforeConnectionStringPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("ConnectionString", eventData.Value, true, true, true);
                    OnAfterConnectionStringPropertyChanged();
                }
            }
        }

        #endregion
        #region ConnectionTypeId

        private global::Sidvall.WorkItemManager.Data.ConnectionType _ConnectionTypeId = global::Sidvall.WorkItemManager.Data.ConnectionType.NetworkSqlServer;
        partial void OnBeforeConnectionTypeIdPropertyGet(Sidvall.Business.PropertyEventData<global::Sidvall.WorkItemManager.Data.ConnectionType> eventData);
        partial void OnBeforeConnectionTypeIdPropertyChanged(Sidvall.Business.PropertyChangeEventData<global::Sidvall.WorkItemManager.Data.ConnectionType> eventData);
        partial void OnAfterConnectionTypeIdPropertyChanged();
        public global::Sidvall.WorkItemManager.Data.ConnectionType ConnectionTypeId
        {
            get
            {
                Sidvall.Business.PropertyEventData<global::Sidvall.WorkItemManager.Data.ConnectionType> eventData = new Sidvall.Business.PropertyEventData<global::Sidvall.WorkItemManager.Data.ConnectionType>(_ConnectionTypeId);
                OnBeforeConnectionTypeIdPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<global::Sidvall.WorkItemManager.Data.ConnectionType> eventData = new Sidvall.Business.PropertyChangeEventData<global::Sidvall.WorkItemManager.Data.ConnectionType>(value, _ConnectionTypeId);
                OnBeforeConnectionTypeIdPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("ConnectionTypeId", eventData.Value, true, true, true);
                    OnAfterConnectionTypeIdPropertyChanged();
                }
            }
        }

        #endregion
        #region FromAddress

        private string _FromAddress = string.Empty;
        partial void OnBeforeFromAddressPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeFromAddressPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterFromAddressPropertyChanged();
        public string FromAddress
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_FromAddress);
                OnBeforeFromAddressPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _FromAddress);
                OnBeforeFromAddressPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("FromAddress", eventData.Value, true, true, true);
                    OnAfterFromAddressPropertyChanged();
                }
            }
        }

        #endregion
        #region IsBodyHtml

        private bool _IsBodyHtml = false;
        partial void OnBeforeIsBodyHtmlPropertyGet(Sidvall.Business.PropertyEventData<bool> eventData);
        partial void OnBeforeIsBodyHtmlPropertyChanged(Sidvall.Business.PropertyChangeEventData<bool> eventData);
        partial void OnAfterIsBodyHtmlPropertyChanged();
        public bool IsBodyHtml
        {
            get
            {
                Sidvall.Business.PropertyEventData<bool> eventData = new Sidvall.Business.PropertyEventData<bool>(_IsBodyHtml);
                OnBeforeIsBodyHtmlPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<bool> eventData = new Sidvall.Business.PropertyChangeEventData<bool>(value, _IsBodyHtml);
                OnBeforeIsBodyHtmlPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("IsBodyHtml", eventData.Value, true, true, true);
                    OnAfterIsBodyHtmlPropertyChanged();
                }
            }
        }

        #endregion
        #region MobileNumber

        private string _MobileNumber = string.Empty;
        partial void OnBeforeMobileNumberPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeMobileNumberPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterMobileNumberPropertyChanged();
        public string MobileNumber
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_MobileNumber);
                OnBeforeMobileNumberPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _MobileNumber);
                OnBeforeMobileNumberPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("MobileNumber", eventData.Value, true, true, true);
                    OnAfterMobileNumberPropertyChanged();
                }
            }
        }

        #endregion
        #region MonitorContextId

        private System.Nullable<int> _MonitorContextId = null;
        partial void OnBeforeMonitorContextIdPropertyGet(Sidvall.Business.PropertyEventData<System.Nullable<int>> eventData);
        partial void OnBeforeMonitorContextIdPropertyChanged(Sidvall.Business.PropertyChangeEventData<System.Nullable<int>> eventData);
        partial void OnAfterMonitorContextIdPropertyChanged();
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public System.Nullable<int> MonitorContextId
        {
            get
            {
                Sidvall.Business.PropertyEventData<System.Nullable<int>> eventData = new Sidvall.Business.PropertyEventData<System.Nullable<int>>(_MonitorContextId);
                OnBeforeMonitorContextIdPropertyGet(eventData);
                return eventData.Value;
            }
            internal set
            {
                Sidvall.Business.PropertyChangeEventData<System.Nullable<int>> eventData = new Sidvall.Business.PropertyChangeEventData<System.Nullable<int>>(value, _MonitorContextId);
                OnBeforeMonitorContextIdPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("MonitorContextId", eventData.Value, true, true, true);
                    OnAfterMonitorContextIdPropertyChanged();
                }
            }
        }

        #endregion
        #region RecipientAddresses

        private string _RecipientAddresses = string.Empty;
        partial void OnBeforeRecipientAddressesPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeRecipientAddressesPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterRecipientAddressesPropertyChanged();
        public string RecipientAddresses
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_RecipientAddresses);
                OnBeforeRecipientAddressesPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _RecipientAddresses);
                OnBeforeRecipientAddressesPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("RecipientAddresses", eventData.Value, true, true, true);
                    OnAfterRecipientAddressesPropertyChanged();
                }
            }
        }

        #endregion
        #region RemoteAddress

        private string _RemoteAddress = string.Empty;
        partial void OnBeforeRemoteAddressPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeRemoteAddressPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterRemoteAddressPropertyChanged();
        public string RemoteAddress
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_RemoteAddress);
                OnBeforeRemoteAddressPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _RemoteAddress);
                OnBeforeRemoteAddressPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("RemoteAddress", eventData.Value, true, true, true);
                    OnAfterRemoteAddressPropertyChanged();
                }
            }
        }

        #endregion
        #region SmsBody

        private string _SmsBody = string.Empty;
        partial void OnBeforeSmsBodyPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeSmsBodyPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterSmsBodyPropertyChanged();
        public string SmsBody
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_SmsBody);
                OnBeforeSmsBodyPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _SmsBody);
                OnBeforeSmsBodyPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("SmsBody", eventData.Value, true, true, true);
                    OnAfterSmsBodyPropertyChanged();
                }
            }
        }

        #endregion
        #region SmsWebAddress

        private string _SmsWebAddress = string.Empty;
        partial void OnBeforeSmsWebAddressPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeSmsWebAddressPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterSmsWebAddressPropertyChanged();
        public string SmsWebAddress
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_SmsWebAddress);
                OnBeforeSmsWebAddressPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _SmsWebAddress);
                OnBeforeSmsWebAddressPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("SmsWebAddress", eventData.Value, true, true, true);
                    OnAfterSmsWebAddressPropertyChanged();
                }
            }
        }

        #endregion
        #region SmtpServer

        private string _SmtpServer = string.Empty;
        partial void OnBeforeSmtpServerPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeSmtpServerPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterSmtpServerPropertyChanged();
        public string SmtpServer
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_SmtpServer);
                OnBeforeSmtpServerPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _SmtpServer);
                OnBeforeSmtpServerPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("SmtpServer", eventData.Value, true, true, true);
                    OnAfterSmtpServerPropertyChanged();
                }
            }
        }

        #endregion
        #region Subject

        private string _Subject = string.Empty;
        partial void OnBeforeSubjectPropertyGet(Sidvall.Business.PropertyEventData<string> eventData);
        partial void OnBeforeSubjectPropertyChanged(Sidvall.Business.PropertyChangeEventData<string> eventData);
        partial void OnAfterSubjectPropertyChanged();
        public string Subject
        {
            get
            {
                Sidvall.Business.PropertyEventData<string> eventData = new Sidvall.Business.PropertyEventData<string>(_Subject);
                OnBeforeSubjectPropertyGet(eventData);
                return eventData.Value;
            }
            set
            {
                Sidvall.Business.PropertyChangeEventData<string> eventData = new Sidvall.Business.PropertyChangeEventData<string>(value, _Subject);
                OnBeforeSubjectPropertyChanged(eventData);
                if (!eventData.Cancel)
                {
                    LoadInstanceField("Subject", eventData.Value, true, true, true);
                    OnAfterSubjectPropertyChanged();
                }
            }
        }

        #endregion
        #region MonitoredWorkItems

        private MonitoredWorkItemCollection _MonitoredWorkItems;
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public MonitoredWorkItemCollection MonitoredWorkItems
        {
            get
            {
                return _MonitoredWorkItems;
            }
            internal set
            {
                LoadInstanceField("MonitoredWorkItems", value, true, false, false);
            }
        }

        #endregion
        #region DataRowContextStorageKey

        protected override string DataRowContextStorageKey
        {
            get
            {
                return global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.GetKey(this);
            }
        }

        #endregion
        #region DataRowIsValid

        public override bool DataRowIsValid(Sidvall.Data.BusinessRuleFilter filter)
        {
            return global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.DataRowIsValid(this, filter);
        }

        #endregion
        #region DataRowStateIsDirty

        public override bool DataRowStateIsDirty
        {
            get
            {
                return global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.DataRowStateIsDirty(this);
            }
        }

        #endregion

        #region LoadMonitoredWorkItems

        public void LoadMonitoredWorkItems(MonitoredWorkItemCollection value)
        {
            LoadInstanceField("MonitoredWorkItems", value, true, true, false);
        }

        #endregion
        #region LoadInstanceField

        public void LoadInstanceField(string fieldName, object value, bool cascade, bool raisePropertyChanged, bool updateState)
        {
            global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.LoadInstanceField(this, fieldName, value, cascade, raisePropertyChanged, updateState);
        }

        #endregion
        #region AcceptChanges

        public void AcceptChanges()
        {
            global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.AcceptChanges(this);
        }

        #endregion
        #region Clone

        public MonitorContext Clone()
        {
            var copySettings = Sidvall.Data.CopySettings.Clone();
            return Copy(copySettings);
        }

        #endregion
        #region Copy

        public MonitorContext Copy()
        {
            return Copy(null);
        }
        public MonitorContext Copy(Sidvall.Data.CopySettings copySettings)
        {
            if (copySettings == null)
                copySettings = new Sidvall.Data.CopySettings();
            if (!Sidvall.Data.DataRowContextManager.IsValid(this, copySettings.RowFilter))
                return null;
            var item = new MonitorContext();
            Import(item, this, copySettings);
            return item;
        }

        #endregion
        #region Import

        public void Import(global::Sidvall.WorkItemManager.Data.IMonitorContext item)
        {
            Import(item, null);
        }
        public void Import(global::Sidvall.WorkItemManager.Data.IMonitorContext item, Sidvall.Data.CopySettings copySettings)
        {
            Import(this, item, copySettings);
        }
        partial void OnAfterImport(MonitorContext destination, global::Sidvall.WorkItemManager.Data.IMonitorContext source, Sidvall.Data.CopySettings copySettings);
        private void Import(MonitorContext destination, global::Sidvall.WorkItemManager.Data.IMonitorContext source, Sidvall.Data.CopySettings copySettings)
        {
            global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.Import(destination, source, copySettings);
            OnAfterImport(destination, source, copySettings);
        }
        partial void OnAfterImport(MonitorContext destination, MonitorContext source, Sidvall.Data.CopySettings copySettings);
        private void Import(MonitorContext destination, MonitorContext source, Sidvall.Data.CopySettings copySettings)
        {
            Import(destination, source as global::Sidvall.WorkItemManager.Data.IMonitorContext, copySettings);
            OnAfterImport(destination, source, copySettings);
        }

        #endregion
        #region ValidateAsync

        public async System.Threading.Tasks.Task<Sidvall.Data.BusinessRuleCollection> ValidateAsync()
        {
            return await ValidateAsync((Sidvall.Data.ValidationSettings)null);
        }
        public async System.Threading.Tasks.Task<Sidvall.Data.BusinessRuleCollection> ValidateAsync(Sidvall.Data.ValidationSettings settings)
        {
            var context = new Sidvall.Business.ValidationContext(settings);
            await global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.ValidateAsync(this, context);
            await ValidateAsync(context);
            return context.AllBusinessRules;
        }
        partial void OnAfterValidate(Sidvall.Data.BusinessRuleCollection itemBusinessRules, Sidvall.Business.ValidationContext context);
        public async System.Threading.Tasks.Task ValidateAsync(Sidvall.Business.ValidationContext context)
        {
            var itemBusinessRules = new Sidvall.Data.BusinessRuleCollection();
            OnAfterValidate(itemBusinessRules, context);
            await context.TaskContext.DoTaskAsync();
            context.AllBusinessRules.AddRange(context.Settings.IncludeNotBrokenRules, itemBusinessRules);
            var businessRulesProvider = this as Sidvall.Data.IBusinessRulesProvider;
            if (businessRulesProvider != null)
                businessRulesProvider.BusinessRules.AddRange(context.Settings.IncludeNotBrokenRules, itemBusinessRules);
        }

        #endregion
        #region Initialize

        public void Initialize()
        {
            global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.Initialize(this);
        }
        public void Initialize(Sidvall.Data.InitializeSettings settings)
        {
            global::Sidvall.WorkItemManager.UI.SystemContextConfig.Current.EntityFacade.MonitorContextManager.Initialize(this, settings);
        }

        #endregion
        
        #region IMonitorContext Members

        string global::Sidvall.WorkItemManager.Data.IMonitorContext.BccRecipientAddresses
        {
            get
            {
                return this._BccRecipientAddresses;
            }
            set
            {
                this._BccRecipientAddresses = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.Body
        {
            get
            {
                return this._Body;
            }
            set
            {
                this._Body = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.CCRecipientAddresses
        {
            get
            {
                return this._CCRecipientAddresses;
            }
            set
            {
                this._CCRecipientAddresses = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.ConnectionString
        {
            get
            {
                return this._ConnectionString;
            }
            set
            {
                this._ConnectionString = value;
            }
        }
        global::Sidvall.WorkItemManager.Data.ConnectionType global::Sidvall.WorkItemManager.Data.IMonitorContext.ConnectionTypeId
        {
            get
            {
                return this._ConnectionTypeId;
            }
            set
            {
                this._ConnectionTypeId = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.FromAddress
        {
            get
            {
                return this._FromAddress;
            }
            set
            {
                this._FromAddress = value;
            }
        }
        bool global::Sidvall.WorkItemManager.Data.IMonitorContext.IsBodyHtml
        {
            get
            {
                return this._IsBodyHtml;
            }
            set
            {
                this._IsBodyHtml = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.MobileNumber
        {
            get
            {
                return this._MobileNumber;
            }
            set
            {
                this._MobileNumber = value;
            }
        }
        System.Nullable<int> global::Sidvall.WorkItemManager.Data.IMonitorContext.MonitorContextId
        {
            get
            {
                return this._MonitorContextId;
            }
            set
            {
                this._MonitorContextId = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.RecipientAddresses
        {
            get
            {
                return this._RecipientAddresses;
            }
            set
            {
                this._RecipientAddresses = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.RemoteAddress
        {
            get
            {
                return this._RemoteAddress;
            }
            set
            {
                this._RemoteAddress = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.SmsBody
        {
            get
            {
                return this._SmsBody;
            }
            set
            {
                this._SmsBody = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.SmsWebAddress
        {
            get
            {
                return this._SmsWebAddress;
            }
            set
            {
                this._SmsWebAddress = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.SmtpServer
        {
            get
            {
                return this._SmtpServer;
            }
            set
            {
                this._SmtpServer = value;
            }
        }
        string global::Sidvall.WorkItemManager.Data.IMonitorContext.Subject
        {
            get
            {
                return this._Subject;
            }
            set
            {
                this._Subject = value;
            }
        }
        System.Collections.Generic.IEnumerable<global::Sidvall.WorkItemManager.Data.IMonitoredWorkItem> global::Sidvall.WorkItemManager.Data.IMonitorContext.MonitoredWorkItems
        {
            get
            {
                return this._MonitoredWorkItems;
            }
        }
        void global::Sidvall.WorkItemManager.Data.IMonitorContext.SetMonitoredWorkItems(Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IMonitoredWorkItem> items)
        {
            UpdateChildProperty(this._MonitoredWorkItems, items);
            this._MonitoredWorkItems = items as MonitoredWorkItemCollection;
        }

        #endregion

        #endregion
        #region Constructors

        public MonitorContext()
        {
        }

        public MonitorContext(Sidvall.Data.DataRowState? dataRowState)
            : base(dataRowState)
        {
        }

        #endregion
    }
}